Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it
Adds
execto the entrypoint script so that the Graylog server process becomes PID 1. This allows the server to gracefaully handle Pod termination signals and shutdown quickly. Without theexec, the shell script swallows the signal (does not pass to child processes) and the Pod is forcibly terminated after theterminationGracePeriodSecondssetting (usually 2 minutes).Compare to the upstream entrypoint script which already uses
exec: https://github.com/Graylog2/graylog-docker/blob/1d774e6623d1cf34fb2c6a8fc72e22ee75787218/docker-entrypoint.sh#L91-L99Graylog server Pod log with fix showing graceful shutdown:
There are no server logs without the graceful shutdown.
And k8s event logging, with fix, Pod is stopped and re-assigned in about 8 seconds:
Compared to no fix, Pod is stopped and re-assigned in 2 minutes after termination grace period:
Which issue this PR fixes
none
Special notes for your reviewer
none
Checklist